package com.cloud.logger.zchain.zchainserver.entity;

import com.alibaba.fastjson.annotation.JSONField;
import com.cloud.logger.zchain.zchainserver.entity.propertyenum.SwitchEnum;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.data.mongodb.core.mapping.Document;

import javax.persistence.Id;
import java.util.Date;

/**
 * @ClassName: AngelaLoggerProjectDtail
 * @author: wcy
 * @return:
 * @Decription: 项目的详细操作信息
 * @CreateDate: 2017/12/4
 */
@Data
@Document(collection = "logger_project_node_detail")
public class AngelaLoggerProjectNodeDetail {

    @Id
    private String id;

    @JsonProperty("code")
    @JSONField(name = "code")
    @ApiModelProperty(name = "code", notes = "编码", example = "1")
    private String code;

    @JsonProperty("ip")
    @JSONField(name = "ip")
    @ApiModelProperty(name = "ip", notes = "安装ip地址", example = "10.0.0.1")
    private String ip;

    @JsonProperty("port")
    @JSONField(name = "port")
    @ApiModelProperty(name = "port", notes = "端口", example = "8080")
    private String port;

    @JsonProperty("create_time")
    @JSONField(name = "create_time", format = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(name = "create_time", notes = "创建时间", example = "2017-12-04 15:18:11")
    private Date createTime;

    @JsonProperty("status")
    @JSONField(name = "status")
    @ApiModelProperty(name = "status", notes = "项目情况(off/on)", example = "off")
    private SwitchEnum status;

    @ApiModelProperty(hidden = true)
    private long version;

    @ApiModelProperty(hidden = true)
    private long createBy;
}
